package cn.chencaiju.day05;

import java.util.Timer;
import java.util.TimerTask;

public class TestTimerTask {
	public static void main(String[] args) {
		Timer timer=new Timer();
		TimerTask task=new Printer();
		timer.schedule(task, 2000, 1000);

		
	}
	
}
class Printer extends TimerTask{
	@Override
	public void run() {
		System.out.println("You are wecame!");		
	}
	
}
